1. Field
Embodiments relate to a method, system, and program for updating data in a system of organization, such as a RAID system.
2. Description of the Related Art
Various techniques have been proposed for organizing data stored in data storage devices such as disk drives. One such data storage organization is referred to as Redundant Array of Independent (or Inexpensive) Disks or (RAID). In a RAID organization, two or more disk drives are employed in combination to improve fault tolerance or performance, or both. There are different types of RAID data storage organizations and these different types are often referred to as RAID “levels 0, 1, 2 . . . .
In a RAID level 0 data organization, for example, the data of a user file is “striped”, that is, blocks of user data are spread across multiple disks to improve performance. However, there is generally no redundancy provided for recovery of data should one of the drives fail in a RAID level 0 organization of data. A RAID level 3 organization of data is similar to RAID level 0 but one disk is typically reserved to store error correction data, often referred to as “parity data.” This parity data may be used to reconstruct lost user data should one of the drives fail.
FIG. 1 shows an example of a RAID level 5 data organization, comprising a plurality of stripes, stripe 1, stripe 2 . . . stripe n, across an array of disk drives 20a, 20b, . . . 20e. Each stripe comprises a plurality of blocks of user data 10 and a block of parity data 12. No particular disk drive is dedicated to storing the parity data blocks 12. Instead, the blocks 12 of parity data for the stripes are distributed throughout all the disks 20a, 20b, . . . 20e of the array, to further improve performance.
FIG. 2 illustrates logical operations which may be performed to generate new parity data when updating old user data on a stripe such as stripe n in a RAID system with new data. As shown in FIG. 2, an Exclusive-OR logical function may be performed on the new user data 30 and the old user data 32 of stripe. The result of the Exclusive-OR function can be Exclusive-OR'ed with the old parity data 33 of stripe n to generate the new parity data 36 for stripe n. The new parity data 36 may be used to overwrite the old parity data 33 on the appropriate RAID storage unit and the new user data 30 may be used to overwrite the old data 32 on the appropriate RAID storage unit.
Because the user data and the parity data of any one particular stripe typically reside on different disk drives, the user data and parity data of a stripe are often not updated at the same time. New user data may be written to the stripe before the new parity data is written or vice versa. If the system were to lose power in the middle of a write operation updating a stripe, in some systems, the user data of the stripe may not be consistent with the parity data of the stripe.
Accordingly, a record may be kept of those stripes, often referred to as “dirty stripes,” which may contain parity inconsistencies, in the event that the system is interrupted by a power failure or other failure before the write operations are completed. For example, some known storage controllers have a non-volatile memory such as a NVRAM (non-volatile Random Access memory) in which the dirty stripe record is maintained. Once the power is restored, the storage controller can access the dirty stripe record in the non-volatile memory and restore the parity consistency of the listed dirty stripes.
Notwithstanding, there is a continued need in the art to improve the performance of processors in data storage organization.